//
//  COWebViewController.swift
//  CocoProject
//
//  Created by Ruthless on 2023/9/1.
//

import UIKit
import WebKit

class COWebViewController: COBaseViewController {
    init(_ url: String) {
        super.init(nibName: nil, bundle: nil)
        
        let request = URLRequest(url: URL(string: url)!)
        self.webView.load(request)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
    override func configUI() {
        view.addSubview(webView)
        
        webView.snp.makeConstraints { make in
            make.left.right.bottom.equalToSuperview()
            make.top.equalToSuperview().offset(statusBarHeight+navHeight)
        }
    }
    private lazy var webView: WKWebView = {
        let webV = WKWebView()
        return webV
    }()

}
